import { createRouter,createWebHashHistory } from "vue-router";

const Home=()=>import('@/views/Home/HomePage.vue')
const Message=()=>import('@/views/message/MessagePage.vue')
const Favor=()=>import('@/views/favor/FavorPage.vue')
const Order=()=>import('@/views/order/OrderPage.vue')
import CityPage from '@/views/city/city.vue'
import Search from "@/views/search/search.vue";
const Detail=()=>import('@/views/detail/details.vue')

const routes=[
  {path:'/',redirect:'/home'},
  {
    path:'/home',
    component:Home,
    // children:[
    //   {path:'city',component:CityPage}
    // ]
  },
  {path:'/message',component:Message},
  {path:'/favor',component:Favor},
  {path:'/order',component:Order},
  {path:'/city',component:CityPage,meta:{
    hiddenTabar:true
  }},
  {path:'/search',component:Search,
    meta:{
      hiddenTabar:true
    }
  },
  {
    path:'/detail/:id',
    component:Detail,
    meta:{
      hiddenTabar:true
    }
  }
]

const router=new createRouter({
    routes,
    history:createWebHashHistory()
})

export default router